<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>系统事件</title>
    <style>
        *{margin: 0;padding: 0;list-style-type: none;}
    </style>
</head>
<body>
    <script>
        //页面加载完后触发
        window.onload = function(){
            console.log("页面加载完后触发");
        }
        //改变窗口大小时触发
        window.onresize = function(){
            console.log("当改变窗口大小时触发");
        }
        //滚动时触发
        window.onscroll = function(){
            console.log("滚动时触发");
        }
        /*
            onload 在页面/图像加载完成后触发
        */
    </script>
</body>
</html>